package com.mrzhou.gateway.provider;

import com.mrzhou.core.tool.constants.TokenConstant;

import java.util.ArrayList;
import java.util.List;

public class AuthProvider {

    public static String TARGET = "/**";
    public static String REPLACEMENT = "";
    public static String TOKEN_HEADER = TokenConstant.TOKEN_HEADER_NAME;
    private static List<String> defaultList = new ArrayList<>();

    static{
        defaultList.add("/oauth/token/**");
        defaultList.add("/token/**");
        defaultList.add("/actuator/health/**");
        defaultList.add("/auth/**");
        defaultList.add("/test/**");
        defaultList.add("/cloud-file/**");
        // knife4j 放行
        defaultList.add("/v2/api-docs/**");
        defaultList.add("/v2/api-docs-ext/**");
        defaultList.add("/webjars/**");
        defaultList.add("/swagger-resources");
        defaultList.add("/swagger-ui.html");
        defaultList.add("/doc.html");
    }

    public static List<String> defaultSkip() {
        return defaultList;
    }

}
